\(\int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx\) [329]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 35 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^{5/2}}{5 d} \]

[Out]

-2/5*I*a*cos(d*x+c)^5*(a+I*a*tan(d*x+c))^(5/2)/d

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.038, Rules used = {3574} \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^{5/2}}{5 d} \]

[In]

Int[Cos[c + d*x]^5*(a + I*a*Tan[c + d*x])^(7/2),x]

[Out]

(((-2*I)/5)*a*Cos[c + d*x]^5*(a + I*a*Tan[c + d*x])^(5/2))/d

Rule 3574

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[2*b*(
d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^(n - 1)/(f*m)), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2
, 0] && EqQ[Simplify[m/2 + n - 1], 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^{5/2}}{5 d} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(73\) vs. \(2(35)=70\).

Time = 1.31 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.09 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\frac {2 a^3 \cos ^3(c+d x) (-i \cos (2 c+5 d x)+\sin (2 c+5 d x)) \sqrt {a+i a \tan (c+d x)}}{5 d (\cos (d x)+i \sin (d x))^3} \]

[In]

Integrate[Cos[c + d*x]^5*(a + I*a*Tan[c + d*x])^(7/2),x]

[Out]

(2*a^3*Cos[c + d*x]^3*((-I)*Cos[2*c + 5*d*x] + Sin[2*c + 5*d*x])*Sqrt[a + I*a*Tan[c + d*x]])/(5*d*(Cos[d*x] +
I*Sin[d*x])^3)

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (29 ) = 58\).

Time = 4.06 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.80

\[\frac {2 \left (-\tan \left (d x +c \right )+i\right )^{3} \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a^{3} \left (-i \left (\cos ^{6}\left (d x +c \right )\right ) \sin \left (d x +c \right )+\cos ^{7}\left (d x +c \right )\right )}{5 d}\]

[In]

int(cos(d*x+c)^5*(a+I*a*tan(d*x+c))^(7/2),x)

[Out]

2/5/d*(-tan(d*x+c)+I)^3*(a*(1+I*tan(d*x+c)))^(1/2)*a^3*(-I*cos(d*x+c)^6*sin(d*x+c)+cos(d*x+c)^7)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (27) = 54\).

Time = 0.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.09 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\frac {\sqrt {2} {\left (-i \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} - 3 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 3 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{3}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{20 \, d} \]

[In]

integrate(cos(d*x+c)^5*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="fricas")

[Out]

1/20*sqrt(2)*(-I*a^3*e^(6*I*d*x + 6*I*c) - 3*I*a^3*e^(4*I*d*x + 4*I*c) - 3*I*a^3*e^(2*I*d*x + 2*I*c) - I*a^3)*
sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))/d

Sympy [F(-1)]

Timed out. \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**5*(a+I*a*tan(d*x+c))**(7/2),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 454 vs. \(2 (27) = 54\).

Time = 0.69 (sec) , antiderivative size = 454, normalized size of antiderivative = 12.97 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\frac {2 \, {\left (i \, a^{\frac {7}{2}} - \frac {6 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {15 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {20 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {15 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {6 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} + \frac {i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}}\right )} {\left (-\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )}^{\frac {7}{2}}}{-5 \, d {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}^{\frac {7}{2}} {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}^{\frac {7}{2}} {\left (\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {4 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {10 i \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {5 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {20 i \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {20 i \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {5 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {10 i \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {4 \, \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} + \frac {2 i \, \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} - \frac {\sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}} + 1\right )}} \]

[In]

integrate(cos(d*x+c)^5*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="maxima")

[Out]

2*(I*a^(7/2) - 6*I*a^(7/2)*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 15*I*a^(7/2)*sin(d*x + c)^4/(cos(d*x + c) + 1
)^4 - 20*I*a^(7/2)*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 15*I*a^(7/2)*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 - 6*
I*a^(7/2)*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 + I*a^(7/2)*sin(d*x + c)^12/(cos(d*x + c) + 1)^12)*(-2*I*sin(d
*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1)^(7/2)/(d*(sin(d*x + c)/(cos(d*x + c) + 1
) + 1)^(7/2)*(sin(d*x + c)/(cos(d*x + c) + 1) - 1)^(7/2)*(-10*I*sin(d*x + c)/(cos(d*x + c) + 1) - 20*sin(d*x +
 c)^2/(cos(d*x + c) + 1)^2 - 50*I*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 25*sin(d*x + c)^4/(cos(d*x + c) + 1)^4
 - 100*I*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 100*I*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 25*sin(d*x + c)^8/(
cos(d*x + c) + 1)^8 - 50*I*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 + 20*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 - 10
*I*sin(d*x + c)^11/(cos(d*x + c) + 1)^11 + 5*sin(d*x + c)^12/(cos(d*x + c) + 1)^12 - 5))

Giac [F]

\[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {7}{2}} \cos \left (d x + c\right )^{5} \,d x } \]

[In]

integrate(cos(d*x+c)^5*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^(7/2)*cos(d*x + c)^5, x)

Mupad [B] (verification not implemented)

Time = 5.76 (sec) , antiderivative size = 112, normalized size of antiderivative = 3.20 \[ \int \cos ^5(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {a^3\,\sqrt {\frac {a\,\left (\cos \left (2\,c+2\,d\,x\right )+1+\sin \left (2\,c+2\,d\,x\right )\,1{}\mathrm {i}\right )}{\cos \left (2\,c+2\,d\,x\right )+1}}\,\left (-2\,\sin \left (c+d\,x\right )-3\,\sin \left (3\,c+3\,d\,x\right )-\sin \left (5\,c+5\,d\,x\right )+\cos \left (c+d\,x\right )\,4{}\mathrm {i}+\cos \left (3\,c+3\,d\,x\right )\,3{}\mathrm {i}+\cos \left (5\,c+5\,d\,x\right )\,1{}\mathrm {i}\right )}{20\,d} \]

[In]

int(cos(c + d*x)^5*(a + a*tan(c + d*x)*1i)^(7/2),x)

[Out]

-(a^3*((a*(cos(2*c + 2*d*x) + sin(2*c + 2*d*x)*1i + 1))/(cos(2*c + 2*d*x) + 1))^(1/2)*(cos(c + d*x)*4i - 2*sin
(c + d*x) + cos(3*c + 3*d*x)*3i + cos(5*c + 5*d*x)*1i - 3*sin(3*c + 3*d*x) - sin(5*c + 5*d*x)))/(20*d)